<script type="text/javascript">
<#if errMsg?exists>
alert("${errMsg}");
</#if>

</script>